<style type="text/css">
A:link {text-decoration: underline; color: #BCC1DD;}
A:visited {text-decoration: none; color: #BCC1DD;}
A:active {text-decoration: none}
A:hover {font-size:2430; font-weight:bold; color: #0099FF;}
</style>




<?php 
	if(isset($game_set_data)) {
		echo '<h1>Game Set #' . $game_set_data['game_set_id'] . '</h1> </br>';
		
?>

<div id="Set_Info">
	<fieldset>
		<legend>Set Info</legend>
		<?php 
			for ( $counter = 1; $counter <= $game_set_data['number_players']; $counter += 1) {
				echo 'Player ' . $counter . ': ' .anchor('profile/show/' . $game_set_data['player' . $counter], $game_set_data['player' . $counter]) .br(1);
			}
			echo 'Number of Games: ' . $game_set_data['number_games'] .br(1);
			echo 'Status: ' . $game_set_data['status'] .br(1);
			if($game_set_data['status'] == 'finished'){
				echo 'Winner: ' . $game_set_data['winner'] .br(1);
			}
		?>
	</fieldset>
</div>

<?php 
	foreach ( $game_data_array as $game_data) {
?>

<div id="Game_Box">
	<fieldset>
		<legend>Game <?php echo $game_data['game_id']; ?> Info</legend>
		<?php 
			echo 'Winner: ' . $game_data['winner'] .br(1);
			echo 'Map: ' . $game_data['map'] .br(1);
			echo 'Date: ' . $game_data['date'] .br(1);
			
			if($game_model->replay_exists($game_data['game_id'])){
				echo 'Replay: '.anchor('game/download/'.$game_data['game_id'], 'Download');
			}else{
				echo 'no replay for this game';
			}
		?>
	</fieldset>
</div>

<?php
	}
?>

<?php
	} else {
		echo '<h1>Game Not Found</h1>';
	}
?>